home *** CD-ROM | disk | FTP | other *** search
/ LOGIC Apps / Logic-APPLE_II_APPS.iso / pc / LOGIC Apple II 5.25" Library - ProDOS / PRO021.dsk / DISK.RECOVER.txt < prev    next >
Text File  |  2012-02-16  |  3KB  |  51 lines

  1.  
  2. Conf: apple/dos #121, 2864 chars
  3. Date: Fri,  4 Apr 86 22:04:50
  4. From: Don Elton (delton)
  5. Subj: vol dir crashes
  6.  
  7. While working on a ProDOS disk cache program (in software) I, of course,
  8. crashed the volume directory on a 5 meg hard disk volume - wiped it clean, all 4 blocks, and of course my backup was a month old.  Provided an
  9. interesting opportunity to experiment with a recovery technique.
  10.  
  11. Everybody knows that there is no track/sector list available for all files on
  12. a prodos disk.  The method described in beneath apple prodos suggests looking
  13. for key blocks that are basically the prodos equivalent of t/s lists.  My
  14. approach was easier though and might suggest some steps users can take to
  15. make their disks more recoverable when things like this happen.
  16.  
  17. It turns out that my volume directory contained about 15 files, all but 3 of
  18. these (PRODOS, CP.SYSTEM, and CP.KEYS) were DIR files.  Those are easily
  19. replacable.  All you have to do to recover all the rest of the files is use
  20. DiskWorks to create a blank directory (following the structure in BAP).  THen
  21. you use the ascii search feature of DiskWorks and search for the ascii string
  22. "HUSTON".  Yep, he left his name in the reserved 8 bytes at the front of
  23. every subdirectory on a ProDOS disk.  Nice touch eh?  You then write down the
  24. block number of each subdirectory found by this technique.  You really only
  25. need to write down the block numbers of the top level directories though.  In
  26. my case I had to fill in entries for 13 dir files.  After this and adding new
  27. copies of Prodos, cp.system, and cp.keys my 5 meg prodos volume was
  28. completely restored enough that I could then back up the volume, reformat,
  29. and restore the volume for extra measure.
  30.  
  31. One pitfall in this method is that Diskworks was unable to recognize the
  32. volume as a prodos volume and insisted on displaying tracks and sectors.  This was a pain to get around.  What I had to do was to use another disk zapper that always assumes a block device (ProZap from Call A.P.P.L.E) and put enough of the volume directory in to make the disk look like ProDOS to DiskWOrks which is otherwise much easier to use than ProZap.
  33.  
  34. Obviously it wouldn't be too tough to write a little utility to find these
  35. subdirectory blocks and by checking the parent pointer, the utility could
  36. filter out all but the top level subdirectories.
  37.  
  38. Another nice utility would be one that would copy the volume directory into a
  39. backup directory file.  I.e. store the volume directory as a subdirectory so
  40. you'd always have dual access to the files (i.e. through two directories).
  41. This would only work for files that don't move or significantly change in
  42. size between backups and would only help when only the volume directory is
  43. crashed, i.e. not the whole disk where you are pretty much out of luck anyway.
  44.  
  45. I'll let you folks know if I write any of the above but in the mean-time I'm
  46. gonna work on the disk cache program awhile, maybe testing it on the floppies
  47. next time.
  48.  
  49.  
  50.  All you have to do to recover all the rest of the files is use
  51.